// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	10/18/2014 1:21:49 AM				
// -----------------------------

#ifndef _DefaultMaterial_h
#define _DefaultMaterial_h

#include "Material.h"

class DefaultMaterial : public Material
{
public:

	Color	m_Diffuse;
	Color	m_Ambient;
	Float	m_Roughness;
	Float	m_Specular;

	DefaultMaterial(Application* lpApp);
	DefaultMaterial(Application* lpApp, const Color& diffuse, const Color& ambient, Float roughness, Float specular);

	virtual void	Apply(Application* lpApp);
	virtual void	UpdateMatrices(Application* lpApp);
	virtual void	UpdateData(Application* lpApp);

	virtual void	SetDiffuseTexture(const RefPtr<ITexture2D>& lpTexture);

private:

	virtual ~DefaultMaterial();

	void			Init(Application* lpApp);

	IVertexShader*	m_lpVertexShader;
	IBuffer*		m_lpMatrixBuffer;

	IPixelShader*	m_lpPixelShader;
	IBuffer*		m_lpMaterialBuffer;

	RefPtr<ITexture2D>	m_lpDiffuseTexture;

	IInputLayout*	m_lpInputLayout;
	ISamplerState*	m_lpSamplerState;

	DefaultMaterial(const DefaultMaterial& refDefaultMaterial);
	DefaultMaterial& operator=(const DefaultMaterial& refDefaultMaterial);
};

#endif